<%@ page language="java" import="java.util.*,com.king.cms.db.*,com.king.cms.common.*" pageEncoding="utf-8"%>
<%@ include file="/hotel/include/css.jsp"%><%-- /*包含css样式表*/ --%>
 <%
   int pow=3 | PowerParameter.amend | PowerParameter.first;
   QueryPage query = (QueryPage)request.getAttribute("query");
   String pageStr = query.getPageStr();
     List dataList=new ArrayList();
  if(query.getDataList() != null)
     dataList=query.getDataList();
 %> 
<html>
<head>
	<title> </title>
	<meta  http-equiv="Expires"     CONTENT="0">           
	<meta  http-equiv="Cache-Control"     CONTENT="no-cache">           
	<meta  http-equiv="Pragma"     CONTENT="no-cache">
<meta content="text/html; charset=gb2312" http-equiv=Content-Type>
<script language="javascript"> 
		var trKiobj;
		var clientId=null;
			function doEnable()
			{
				form1.bmMc.disabled=false;
				form1.bmBzrs.disabled=false;
			}
			function  ki_add()
			{
				window.open('<%=basePath%>mult/dishAction.do?action=add','_self');
			}
			function ki_del(){
			if(confirm("确认删除所选终端？"))
				form1.submit();
			}
			function ki_amend(){
			 var objs =   document.getElementsByName('dishId');
		         var checkIds = 0;
		         var dishId = '';
		         if(objs.length>0){
		            for(var i=0;i<objs.length;i++){
		                 if(objs[i].checked)
		                   checkIds++;
		            }        
		         }
		         if(checkIds >1){
		            alert('请选择一条记录进行修改');
		            return;
		         }
		         if(checkIds == 0){
		            alert('请选择	要修改的记录');
		            return;
		         }
		         if(checkIds == 1){
		           for(var i=0;i<objs.length;i++){
		                 if(objs[i].checked)
		                   dishId = objs[i].value;
		            }   
		         }   
                  window.open('<%=basePath%>mult/dishAction.do?action=modify&dishId='+dishId,'_self');
			 
			}
			function selmm(trobj,id)
			{
			
				if(trobj != null){
					deptid =id;
					if(trKiobj != null)
					   trKiobj.className='td3';
				     trobj.className='td1';
				}
			 trKiobj=trobj;
			} 
</script>
</head>

<body background="<%=imgpath%>top3.gif" leftmargin="0" topmargin="0">
<form name="form1" method="post" action="<%=basePath%>mult/dishAction.do?action=delete">
	<center>	
	<table border="0" cellpadding="0" cellspacing="0" width="100%" height="2">
    <tr>
      <td width="9" height="1">
      </td>
      <td  height="1" background="">
      <p align="center"><b>菜肴维护</b></td>
      <td width="9" height="1">
      </td>
    </tr>
    </table>

	<table border="0" cellpadding="0" cellspacing="0" width="80%" height="1">
		<tr>
		  <td height="3">
		  </td>
		</tr>
	</table>       
	<table height="48" border="0" cellpadding="2" cellspacing="1" class="bg_table" style="width:90%" bordercolor="#111111">
	   <tr class="top_td"> 
    <td width="5%">序号</td>
    <td width="5%">操作</td>
    <td width="">菜肴名称</td>
    <td width="">菜肴描述</td>
    <!-- <td width="">终端网卡</td>-->
    <td width="">菜肴类别</td>
  
  </tr>
 <%if(dataList.size()>0){
        for(int i=0;i<dataList.size();i++){
                 Map m = (Map)dataList.get(i);
    %>
  <tr <%if(i%2==1){%> class="td2" onMouseOver="this.className='td5'" onMouseOut="this.className='td2'"<%} else {%>class="td3" onMouseOver="this.className='td5'" onMouseOut="this.className='td3'" <%}%> onclick="selmm(this,<%if(m.get("ID") != null) out.print(m.get("ID")); %>)" onMouseOver="this.className='td5'" onMouseOut=" ">
    <td><%=(query.getCurrentPageNo()-1)*10+(i+1) %></td>
    <td><input type="checkbox" name="dishId" value="<%=m.get("ID") %>"></td>
    <td><%=StringUtil.NULL2Blank(m.get("DISH_NAME")+"") %></td>
    <td><%=StringUtil.NULL2Blank(m.get("DISH_DESC") +"")%></td>
    <td><%=StringUtil.NULL2Blank(m.get("DISH_TYPE")+"") %></td>
 
  </tr>
    <%}} else{ %>
    <tr class="td2"> 
		<td colspan="10" align="center"><font color="red">您还没登记菜肴信息</font></td>
	  </tr>
    <%} %>
 </form>
	   <tr class="top_td"> 
		<td colspan="10"><%=pageStr %></td>
	  </tr>

     </table>
  </center>


</body>
</html>
<%@ include file="/hotel/pow.jsp"%>
